from abc import abstractmethod, ABC
from contextlib import AbstractContextManager
from typing import Dict


class AbstractKVStore(ABC):
    @abstractmethod
    def get(self, k: bytes, default: bytes = None) -> bytes: ...

    @abstractmethod
    def put(self, k: bytes, v: bytes): ...

    @abstractmethod
    def update(self, kv_pairs: Dict[bytes, bytes]): ...

    @abstractmethod
    def __delitem__(self, key: bytes): ...

    @abstractmethod
    def __getitem__(self, item: bytes): ...

    @abstractmethod
    def __setitem__(self, key: bytes, value: bytes): ...
